<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta name="keywords" content="关键字,keywords" />
    <meta name="description" content="描述">
    <title>{:config('webtitle')}</title>
    <link rel="stylesheet" href="__CSS__/bootstrap.css" />
    <link rel="stylesheet" href="__CSS__/style.css" />
    <link rel="stylesheet" href="__CSS__/layui.css" />
    <link rel="stylesheet" href="__CSS__/wwstyle.css" />
    <link rel="stylesheet" href="__CSS__/zrstyle.css" />
    <script type="text/javascript" src="__JS__/jquery-2.1.0.js"></script>
    <script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
    <script type="text/javascript" src="__JS__/layer/layer.js"></script>
    <script type="text/javascript" src="__JS__/iframe.js"></script>
    <!--//laypage翻页需要 start-->
    <script type="text/javascript" src="__JS__/laypage/laypage.js"></script>
    <script type="text/javascript" src="__JS__/laytpl/laytpl.js"></script>
    <script type="text/javascript" src="__JS__/info.js"></script>
    <link rel="stylesheet" href="__CSS__/laypage.css" />
    <!--//laypage翻页需要 end-->
    <script type="text/javascript" src="__JS__/bootstrap-datetimepicker.js"></script>
    <link rel="stylesheet" href="__CSS__/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript">

        function loginOut(){
            $.post("{:url('Login/loginOut')}",{},function(e){
                layer.msg(e.msg, {icon: 6,time: 2000},function(){window.location.href=e.url;});
            })
        }

        message_tips();
        function message_tips(){
            $.get("{:url('Letter/tips')}", function(data){
                if(data.rcount>0){
                    $("#lettertips").css("color","red");
                }else{
                    $("#lettertips").css("color","#ffffff");
                    $(".InforTip").hide();
                }
                $('#lettertips').html(data.rcount);
                $('#lettertipss').html(data.rcount);
            },'json');
            setTimeout('message_tips()',5000);
        }
    </script>

</head>
<meta charset="UTF-8">
<style>
    #MenuName{
        color: #333333;
        font-size: 18px;
        font-family: "微软雅黑";
    }
    .Authority {
        background: #fff;
        padding: 10px 15px;
        border-bottom: 1px solid #dcdcdc;
    }

    .content{
        width: 100%;
        overflow: auto;

    }
    /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
    ::-webkit-scrollbar
    {
        width: 0px;
        height: 16px;
        background-color: #F5F5F5;
    }

    /*定义滚动条轨道 内阴影+圆角*/
    ::-webkit-scrollbar-track
    {
        -webkit-box-shadow: inset 0 0 0px rgba(242,242,242,0);
        border-radius: 10px;
        background-color: #F5F5F5;
    }

    /*定义滑块 内阴影+圆角*/
    ::-webkit-scrollbar-thumb
    {
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 0px rgba(242,242,242,0);
        background-color: #d1d1d1;
    }
</style>
<body>
<div class="navbar navbar-default nav-top" style="margin-bottom: 0px;">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="javascript:void(0)bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand navbar-logo" href="javascript:void(0)"><img src="__IMG__/logo.png"></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav nav-left">
                {foreach $menu as $key => $val}
                <li {if condition="$controller eq UrlTrans($val.url)"}class="active"{/if}>
                <a href="/{$val.url}" data-pid="{$val.id}" >{$val.title}</a>
                </li>
                {/foreach}
            </ul>

            <ul class="nav navbar-nav navbar-right nav-right">
                <li class="dropdown">
                    <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-th"></span><span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="javascript:void(0)" target="myFrameName">Action</a>
                        </li>
                        <li>
                            <a href="javascript:void(0)" target="myFrameName">Another action</a>
                        </li>
                        <li>
                            <a href="javascript:void(0)" target="myFrameName">Something else here</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="javascript:void(0)" target="myFrameName"><span class="glyphicon glyphicon-volume-down"></span>0</a>
                </li>
                <li>
                    <a href="{:url('Letter/index')}"> <span class="glyphicon glyphicon-envelope"></span><span id="lettertips">0</span></a>
                </li>
                <li>
                    <a href="javascript:void(0)" class="dropdown-toggle head-name" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{$username}<img class="Head_img" src="{:Config('IMAGES_PATH')}{$portrait}"></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="{:url('Users/PersonalInformation')}">个人资料</a>
                        </li>
                        <li>
                            <a href="javascript:void(0)" >操作日志</a>
                        </li>
                        {if condition="$is_admin eq 1"}
                        <li>
                            <a href="{:url('Authgroup/index')}">权限分配</a>
                        </li>
                        {/if}
                        <li>
                            <a href="javascript:void(0)"  onclick="loginOut();">退出</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</div>
